
<!DOCTYPE html>
<html>
    <head>

        <script class="jsbin" src="<?php echo asset_url() . 'js/jquery.min.js'; ?>"></script>
        <script type="text/javascript">
            $(function() {
                $("#preview").hide();
                $("#info").hide();

            });
        </script>  
        <script type="text/javascript">
            function readURL(input) {
                if (input.files && input.files[0]) {
                    var reader = new FileReader();

                    reader.onload = function(e) {
                        $('#preview')
                                .attr('src', e.target.result)
                                .width(150);
                        $("#preview").show();
                    };

                    reader.readAsDataURL(input.files[0]);


                }

            }
            ;
        </script>
        <title>Flower Shop - Cập Nhật Sản Phẩm</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link rel="stylesheet" type="text/css" href="<?php echo asset_url() . 'css/style.css'; ?>" />
        <link rel="stylesheet" type="text/css" href="<?php echo asset_url() . 'css/stylenav.css'; ?>" />
        <link rel="stylesheet" href="<?php echo asset_url() . 'css/admin/style.css'; ?>" type="text/css"/>
        <script type="text/javascript" src="<?php echo asset_url() . 'js/jquery.js'; ?>"></script>
    </head>
    <body>
        <div id="wrap">
            <?php include '/layout/header.php'; ?>
            <div class="center_content" style="background: white">
                <div id="noidung_admin" >
                    <h2 class="admin_header" style="padding-top: 20px">Cập Nhật Hoa</h2>
                    <div id="info" style="width: 50%;height: 100px; margin-top: 200px; text-align:center;background: green;opacity: 0.5;z-index: 1000;position: absolute" name="info">
                        <h2>Đã thêm Dữ Liệu</h2>
                    </div>
                    <div id="div_dang_tin">
                        <?php echo form_open_multipart('manage/update_data'); ?>
                        <table class="bangdangtin" width="100%" border="0" cellspacing="0" cellpadding="5">
                            <tbody><tr>
                                    <td>&nbsp;</td>
                                    <td>&nbsp;</td>
                                </tr>
                                <tr>
                                    <td width="200" align="right">Mã Hoa:</td>
                                    <td>
                                        <label><?php echo $MaHoa; ?></label>
                                        <?php echo form_hidden('MaHoa', $MaHoa) ?>
                                    </td>
                                </tr>
                                <tr>
                                    <td width="200" align="right">Tên Hoa:</td>
                                    <td><input type="text" name="TenHoa" style="width:300px;"></td>
                                </tr>
                                <tr>
                                    <td width="200" align="right">Loại Hoa:</td>
                                    <td>
                                        <select class="danhmuc" name="LoaiHoa" style="width:300px;margin-top:5px">
                                            <?php
                                            if (isset($category)) {
                                                foreach ($category as $val) {
                                                    //$val = (object) $val;
                                                    $loaihoa = $val->TenLoaiHoa;
                                                    ?>
                                                    <option class = "danhmuc_cap_1" value = "<?php echo $loaihoa; ?>"><?php echo $loaihoa; ?></option>
                                                    <?php
                                                }
                                            }
                                            ?>
                                        </select>
                                        <br>
                                    </td>
                                </tr> 
                                <tr>
                                    <td width="200" align="right">Màu Sắc:</td>
                                    <td>
                                        <select class="danhmuc" name="MauSac" style="width:300px;margin-top:5px">
                                            <?php
                                            if (isset($color)) {

                                                foreach ($color as $val) {
                                                    //$val = (object) $val;
                                                    $mausac = $val->TenMauSac;
                                                    ?>
                                                    <option onclick = "cothaydoi = 1" class = "danhmuc_cap_1" value = "<?php echo $mausac; ?>"><?php echo $mausac; ?></option>
                                                    <?php
                                                }
                                            }
                                            ?>
                                        </select>
                                        <br>
                                    </td>
                                </tr>  
                                <tr>
                                    <td align="right">Giá </td>
                                    <td><label>
                                            <input name="DonGia" style="width: 250px" type="text" id="price" value="">&nbsp;&nbsp;VNĐ
                                        </label>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">Giá Cũ/Thị Trường </td>
                                    <td><label>
                                            <input name="DonGiaCu" style="width: 250px" type="text" id="priceold" value="">&nbsp;&nbsp;VNĐ
                                        </label>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">Số Lượng </td>
                                    <td><label>
                                            <input name="SoLuong" style="width: 250px" type="text" id="qty" value="">
                                        </label>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">Mô Tả</td>
                                    <td><textarea name="MoTa" cols="" rows="" id="suatomtat" style="width:300px; font-family:tahome,arial; font-size:12px; height:50px;"></textarea></td>
                                </tr>

                                <tr>
                                    <td valign="top" align="right">Hình Ảnh</td>
                                    <td>
                                        <?php
                                        if (isset($error))
                                            echo $error;
                                        ?>
                                        <input type="file" name="userfile" size="20" onchange="readURL(this);"/>
                                        <br/>
                                        <?php
                                        if (isset($upload_data))
                                            echo form_hidden('HinhAnh', $upload_data['file_name'])
                                            ?>
                                        <img style="" id="preview" src="#" alt="your image" />

                                    </td>
                                </tr>

                                <tr>
                                    <td valign="top">&nbsp;</td>
                                    <td><input checked="checked" id="auto_reset" type="checkbox" value=""> 
                                        Tự động reset giá trị các ô nhập sau khi thêm</td>
                                </tr>

                                <tr>
                                    <td valign="top">&nbsp;</td>
                                    <td>
                                        <input name="button2" type="submit" id="nut"  value="Cập Nhật">
                                    </td>
                                </tr>
                            </tbody>
                        </table>

                        </form>
                    </div>
                    <a id="backlink" style="font-size: 13px" href="http://localhost:8080/flowershop-424-641/index.php/manage">Quay Lại Trang Quản Trị</a>
                </div>
            </div>
            <div class="footer">
                <div class="left_footer"><?php echo img(asset_url() . 'imgs/footer_logo.gif', TRUE); ?><br />
                    <a href="http://csscreme.com"><?php echo img(asset_url() . 'imgs/csscreme.gif', TRUE); ?></a></div>
                <div class="right_footer"> <a href="http://all-free-download.com/free-website-templates/">home</a> <a href="http://all-free-download.com/free-website-templates/">about us</a> <a href="http://all-free-download.com/free-website-templates/">services</a> <a href="http://all-free-download.com/free-website-templates/">privacy policy</a> <a href="http://all-free-download.com/free-website-templates/">contact us</a> </div>
            </div>

            <div align=center>This template  downloaded form <a href='http://all-free-download.com/free-website-templates/'>free website templates</a></div></body>

</body>
</html>
